package com.example.victory.mysql;

import org.apache.ibatis.annotations.Insert;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Select;

import java.util.List;

@Mapper
public interface CustomerMysqlMapper {
    @Insert("INSERT INTO click_like(month, clicked_by, click_date, click_people, clicked_type) VALUES (#{month},#{clickRyid},#{clickDate},#{ryid},#{clickLikeType})")
    void insertClickLikeRecord(@Param("ryid") Integer ryid, @Param("clickRyid") Integer clickRyid, @Param("month") String month, @Param("clickLikeType") Integer clickLikeType, @Param("clickDate") String clickDate);

    @Select("SELECT click_people FROM click_like WHERE clicked_by = #{ryid} AND month = #{month} AND clicked_type = #{clickLikeType}")
    List<Integer> getClickLikeCount(@Param("ryid") Integer ryid, @Param("month") String month, @Param("clickLikeType") Integer clickLikeType);
}
